<!DOCTYPE html>
<html manifest="cash.appcache">
    <head>
  <script type="text/javascript" src="js/hero.js"></script>
  <script type="text/javascript">
  API.boot = function(data){
  }
  API.special_logic = function(data){
    if (data.file) {
      API.out({datas:[{name:'editor',file:data.file}]});
    };
    if (data.name == 'editBtn') {
      API.out({datas:[
        {name:'editBtn',backgroundColor:'49C13E',titleColor:'ffffff'},
        {name:'debugBtn',backgroundColor:'ffffff',titleColor:'666666'},
        {name:'projBtn',backgroundColor:'ffffff',titleColor:'666666'},
        {name:'projBoard',hidden:true},
        {name:'debugView',hidden:true},
      ]});
    };
    if (data.name == 'debugBtn') {
      API.out({datas:[
        {name:'editBtn',backgroundColor:'ffffff',titleColor:'666666'},
        {name:'debugBtn',backgroundColor:'49C13E',titleColor:'ffffff'},
        {name:'projBtn',backgroundColor:'ffffff',titleColor:'666666'},
        {name:'projBoard',hidden:true},
        {name:'debugView',hidden:false},
        {name:'simulator',debugContainer:'debugView'}
      ]});
    };
    if (data.name == 'projBtn') {
      API.out({datas:[
        {name:'editBtn',backgroundColor:'ffffff',titleColor:'666666'},
        {name:'debugBtn',backgroundColor:'ffffff',titleColor:'666666'},
        {name:'projBtn',backgroundColor:'49C13E',titleColor:'ffffff'},
        {name:'projBoard',hidden:false},
      ]});
    };
  };
  API.reloadData = function(data){

  };

  var ui = {
  version:0,
  nav:{
        navigationBarHidden:true
  },
  views:
  [
    {
      class:'HeroView',
      name:'silde',
      frame:{w:'55',h:'1x'},
      borderColor:'aaaaaa',
      subViews:[
        {
          class:'HeroImageView',
          frame:{x:'10',y:'10',w:'35',h:'35'},
          name:'header',
          borderColor:'ffffff',
          cornerRadius:25
        },
        {
          class:'HeroButton',
          frame:{y:'55',w:'55',h:'110'},
          backgroundColor:'ffffff',
          name:'editBtn',
          title:'编辑',
          titleColor:'666666',
          size:12,
          click:{name:'editBtn'},
        },
        {
          class:'HeroButton',
          frame:{y:'165',w:'55',h:'110'},
          backgroundColor:'ffff',
          name:'debugBtn',
          title:'调试',
          titleColor:'666666',
          size:12,
          click:{name:'debugBtn'},
        },
        {
          class:'HeroButton',
          frame:{y:'275',w:'55',h:'110'},
          backgroundColor:'ffff',
          name:'projBtn',
          title:'节点',
          titleColor:'666666',
          size:12,
          click:{name:'projBtn'},
        }
      ]
    },
    {
      class:'HeroFilesTree',
      frame:{x:'55',w:'240',h:'1x'},
      borderColor:'aaaaaa',
      backgroundColor:'ffffff',
      dir:'/Users/liuguoping/hero-mobile1/hero-js/cash/v1'
    },
    {
      class:'HeroFileEditor',
      name:'editor',
      frame:{x:'284',r:'320',h:'1x'},
      borderColor:'aaaaaa',
      backgroundColor:'ffffff',
    },
    {
      class:'HeroSimulator',
      name:'simulator',
      src:'http://localhost:3000/cash.html',
      frame:{w:'320',r:'0',h:'1x'},
      borderColor:'aaaaaa',
      backgroundColor:'ffffff',
      zIndex:6,
      device:'iphone6',
    },
    {
      class:'HeroWebKit',
      name:'debugView',
      frame:{x:'55',r:'320',h:'1x'},
      borderColor:'aaaaaa',
      backgroundColor:'ffffff',
      zIndex:7,
      hidden:true,
      src:'about:blank'
    },
    {
      class:'HeroView',
      name:'projBoard',
      frame:{x:'55',r:'0',h:'1x'},
      borderColor:'aaaaaa',
      backgroundColor:'ffffff',
      zIndex:10,
      hidden:true,
      subViews:[
        {
          class:'HeroLabel',
          frame:{x:'20',y:'0',w:'200',h:'40'},
          text:'节点',
          textColor:'aaaaaa',
          size:16,
          
        },
        {
          class:'HeroMicroService',
          name:'express',
          frame:{x:'0',y:'40',r:'0',b:'0'},
          cornerRadius:4,
          running:true,
        },
      ]
    },








    {
      class:'HeroToast',
      name:'toast',
    }
  ]
};
</script>
</head>
</html>
